1. Field of the Invention
The present invention generally relates to memory management techniques for computing devices. More specifically, the present invention relates to techniques for allocating memory for immutable data on a computing device.
2. Related Art
A wide range of memory management techniques have been developed to facilitate sharing limited memory resources between programs executing on a computing device. For instance, paging mechanisms enable a program and its associated data to be split across non-contiguous memory. Virtual memory techniques separate the memory addresses used by a process from actual physical addresses and allow a virtual address space to exceed the physical memory size of the computing device. Such virtual memory techniques can increase the perceived amount of memory available to a program by swapping infrequently-used memory pages out to secondary storage.
Unfortunately, some computing devices, such as mobile phones, may include very limited amounts of memory, and may not include secondary storage that can be used as swap space. Consequently, an application that accesses a large set of data may be too large to run on such a memory-constrained device, because the memory is too small to hold the full application code and data set, and the operating system of the device cannot swap rarely-used data out of the device's main memory into secondary storage. As a result, the application and/or the data set may have to be modified considerably before the program can be successfully executed on such a memory-constrained device.
Hence, what is needed is a method that allows programs to run on memory-constrained devices without the limitations of existing techniques.